import request from "@/utils/request";

// 查询列表
export function listRefund(query) {
  return request({
    url: "/system/refundOrder/list",
    method: "get",
    params: query,
  });
}
//获取所有合同列表
export function listContract(query) {
  return request({
    url: "/system/contract/getAllContractList",
    method: "get",
    params: query,
  });
}
//退款项目列表
export function listRefundItem(query) {
  return request({
    url: "/system/itemMer/getReturnItemList",
    method: "get",
    params: query,
  });
}
//监听选择退款项目
export function refundOrder(data) {
  return request({
    url: "/system/refundOrder/countRefundItemPrice",
    method: "post",
    data,
  });
}
//获取大写金额
export function getCalLetter(query) {
  return request({
    url: "/common/amountCapital",
    method: "get",
    params: query,
  });
}
//添加退款
export function addRefund(data) {
  return request({
    url: "/system/refundOrder",
    method: "post",
    data,
  });
}
//查询退款申请
export function queryRefund(id) {
  return request({
    url: "/system/refundOrder/" + id,
    method: "get",
  });
}
//修改退款申请
export function updateRefund(data) {
  return request({
    url: "/system/refundOrder",
    method: "put",
    data,
  });
}
//删除退款
export function deleteRefund(id) {
  return request({
    url: "/system/refundOrder//" + id,
    method: "delete",
  });
}
//提交审核
export function submitAudit(data) {
  return request({
    url: "/system/refundOrder/submitReviewRefundOrder",
    method: "post",
    data,
  });
}
//退款
export function refund(data) {
  return request({
    url: "/system/refundOrder/refundOrderUpdate",
    method: "post",
    data,
  });
}
